home *** CD-ROM | disk | FTP | other *** search
/ Aminet 23 / Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso / Aminet / dev / amos / AMOS1097.lzh / AMOSLIST / 000051_amos-request@svcs1.digex.net_Fri Oct 3 07:48:18 1997.msg < prev    next >
Internet Message Format  |  1997-11-02  |  2KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
  2.     by mail3.access.digex.net (8.8.5/8.8.5) with ESMTP id HAA20771
  3.     for <mcox@access.digex.net>; Fri, 3 Oct 1997 07:48:17 -0400 (EDT)
  4. Received: (from daemon@localhost)
  5.     by svcs1.digex.net (8.8.5/8.8.5) id GAA01273
  6.     for amos-out; Fri, 3 Oct 1997 06:36:31 -0400 (EDT)
  7. Received: from mail4.access.digex.net (mail4.access.digex.net [205.197.247.2])
  8.     by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id GAA01270
  9.     for <amos-list@svcs1.digex.net>; Fri, 3 Oct 1997 06:36:30 -0400 (EDT)
  10. Received: from com1.uclan.ac.uk (com1.uclan.ac.uk [193.61.255.3])
  11.     by mail4.access.digex.net (8.8.5/8.8.5) with ESMTP id GAA07305
  12.     for <amos-list@access.digex.net>; Fri, 3 Oct 1997 06:36:18 -0400 (EDT)
  13. Received: from mail-gw.uclan.ac.uk by com1.uclan.ac.uk with SMTP (PP);
  14.           Fri, 3 Oct 1997 11:31:59 +0100
  15. Received: from MAS1/MAILQ by mail-gw.uclan.ac.uk (Mercury 1.21);
  16.           3 Oct 97 11:36:09 GMT+0
  17. Received: from MAILQ by MAS1 (Mercury 1.21); 3 Oct 97 11:35:36 GMT+0
  18. From: "Lee." <l.a.atkins@uclan.ac.uk>
  19. Organization: University of Central Lancashire
  20. To: amos-list@access.digex.net
  21. Date: Fri, 3 Oct 1997 11:30:14 GMT+0
  22. Subject: Re: Sorting routine. Bubble sort
  23. Priority: normal
  24. X-mailer: Pegasus Mail for Windows (v2.33)
  25. Message-ID: <4AED992BA0@mail-gw.uclan.ac.uk>
  26. Status: O
  27. X-Status: 
  28.  
  29.  
  30. > Hi!
  31. > Is there a smooth way to sort 20 variables???
  32. This is the second sorting thing written so heres my bubble sort 
  33. routine.
  34. Im doing this now from memory so it may/may not work
  35.  
  36. Dim v(20)               <-our variables
  37. ...
  38. .....
  39.  
  40. Repeat
  41. c=0
  42. For q=1 to 19
  43. IF v(q)>v(q+1)
  44.  temp=v(q)
  45.  v(q)=v(q+1)
  46.  v(q+1)=temp         <-swap em round
  47.  c=1
  48. END IF
  49. Next q
  50. Until c=0
  51.  
  52. That should work!! hopefuly
  53. ____________________________________
  54. Lee Atkins.
  55. L.A.ATKINS@UCLAN.AC.UK
  56.  
  57. IRC nick : EMBWBAM
  58. ________________________________________
  59. Metal detector mornings!
  60. ________________________________________